package com.jbm.jbmsupplier.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.Toast;

import com.jbm.jbmsupplier.utlis.ExitActivity;


/**
 * Created by 家帮忙 on 2017/4/10.
 */

public class MyFriend extends AllActivityApp {
    @Override
    public int setContentView() {
        return 0;
    }

    @Override
    public void initIalizeView() {

    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
    long che=0;
    @Override
    public void onBackPressed() {
        if (System.currentTimeMillis()-che>2000){
            Toast.makeText(this, "再按一次退出", Toast.LENGTH_SHORT).show();
            che=System.currentTimeMillis();
        }else {
            ExitActivity.getInstance().exitActivity();
        }
    }
}
